package com.hxexp.weixin.hpe.api.passengerlist.model;

import java.io.Serializable;

import org.springframework.util.StringUtils;

import com.hxexp.weixin.constant.StringConstant;

/**
 * 乘客信息
 *
 * @author wang.bin
 *
 */
public final class PassengerBean implements Serializable {

    private static final long serialVersionUID = -418896039521144637L;
    /**
     * 乘客ID
     */
    private String passengerId;
    /**
     * 用户ID
     */
    private String userId;
    /**
     * 乘客姓名
     */
    private String fullname;
    /**
     * 性别
     */
    private String gender;
    /**
     * 手机号码
     */
    private String mobile;
    /**
     * 证件类型
     */
    private String identificationType;
    /**
     * 证件号码
     */
    private String identificationNumber;
    /**
     * 乘客类型
     */
    private String passengerType;

    public String getPassengerId() {
        if (StringUtils.isEmpty(passengerId) || StringConstant.USER_OTHER_PASSENGERID.equals(passengerId)) {
            return userId;
        } else {
            return passengerId;
        }
    }

    public void setPassengerId(String passengerId) {
        this.passengerId = passengerId;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getFullname() {
        return fullname;
    }

    public void setFullname(String fullname) {
        this.fullname = fullname;
    }

    public String getGender() {
        return gender;
    }

    public void setGender(String gender) {
        this.gender = gender;
    }

    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    public String getIdentificationType() {
        return identificationType;
    }

    public void setIdentificationType(String identificationType) {
        this.identificationType = identificationType;
    }

    public String getIdentificationNumber() {
        return identificationNumber;
    }

    public void setIdentificationNumber(String identificationNumber) {
        this.identificationNumber = identificationNumber;
    }

    public String getPassengerType() {
        return passengerType;
    }

    public void setPassengerType(String passengerType) {
        this.passengerType = passengerType;
    }

    /*
     * (non-Javadoc)
     *
     * @see java.lang.Object#toString()
     */
    @Override
    public String toString() {
        return String.format("PassengerBean [passengerId=%s, userId=%s, fullname=%s, gender=%s, mobile=%s, identificationType=%s, identificationNumber=%s, passengerType=%s]", passengerId, userId,
                fullname, gender, mobile, identificationType, identificationNumber, passengerType);
    }

}
